Understanding dependent UDAs

You can add logic to User Defined Attributes (UDAs) that have Predefined Value lists, enabline you to define Dependency Contexts that determine which options are made available to your users. This enables you to help narrow down the choices that users need to make. For example, your company needs to specify the temper applied to a given material. By defining a Predefined List UDA to automatically narrow the available tempers based on the material that is selected, you can automate what would otherwise be a near-impossible task.

Another example is organizational hierarchy within a large global company that has multiple regions, with each region having multiple product lines and multiple projects. Having a single list of all company projects might become unnavigable for users looking for a particular project. If you define lists to display only those projects that exist within a particular product line in a particular region, the choice is narrowed down to a manageable selection.

Dependent UDA example

Assume that your company has three regions, each of which has a specific product line, and each product line has three active projects:

Region:

North America

Europe

Asia

Product Line

Widgets

Gizmos

Doodads

Projects

X1A
X1B
X1C

X2A
X2B
X2C

X3A
X3B
X3C

You can define three UDAs for Region, Product Line, Projects, and give them predefined lists for the values. But if you place these lists on the Cost Guide and expect your users to select the correct combination of values when costing components, they might make mistakes. For example, a user could select “North America” for the region, and “Gizmos” for the product line, and “X3B” for the project, none of which match the other values.

Here’s how you could define these UDAs with Dependency Contexts to ensure only the correct values are made available, based on other selections.

  1. Define a Predefined List UDA for Region. Note that this top-level UDA does not have any Dependency Contexts:

  2. Define a Predefined List UDA for Product Line. Note that this UDA has Dependency Contexts on Region. North America is shown, but you need to define dependencies for Europe (Gizmos) and Asia (Doodads) also.

  3. Finally, define a Predefined List UDA for Projects, which has dependencies on Product Line. Widgets is shown, with the three projects that belong to that line, but you must also define the dependencies for Gizmos (X2A-X2C) and Doodads (X3A – X3C).

  4. Make sure to make these UDAs visible with Dialog Views. (See Managing dialog views for more details.) 

    Publish your work, and then go to the Cost Guide and see the results:

    If you have not done any other customization, the new attributes appear at the bottom of section 1.2 Company-Defined Attributes.

    When your users click through these attributes in order (top to bottom), each selection will determine what the next menu will offer. For example, selecting “North America” for the region ensures that only “Widgets” is available for Product Line, and only “X1A, X1B, X1C” are available for Projects:

Dependency terminators

In this simple example, no precautions against having users access these new UDAs out of order was taken.

Look what happens if users jump directly to Projects before selecting a Region and a Product Line:

The Projects UDA drop-down menu displays a completely unfiltered menu. For this small example, this is not an issue where there are few selections. Users might be overwhelmed with multiple options. If users select one, and then select an item in the Region or Product Line that does not support that project, their original selection is cleared and they must make another selection from the valid options shown.

 

To avoid this kind of situation, dependency context terminators are added to the Product Line and Projects definitions. This are special dependency context definitions that take effect if none of the expected conditions are met.

  1. Go back to steps 2 and 3 in the previous examples and add the following lines to the Product Line and Projects UDAs as shown in the screenshots below:

    • UDA: Region: Any

    • UDA: ProductLine: Any

      (You specify “Any” by leaving the Values column blank when you define the Dependency Context.)

  2. Re-publish, then bring up a fresh Cost Guide.

  3. The Product Line field is disabled until you select a Region, and the Projects field is disabled until you select a Product Line. A “Why is this disabled” link explains to users how they need to proceed.